package com.success.application.myapplication;

import android.support.v4.app.FragmentManager;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

import com.google.gson.reflect.TypeToken;
import com.success.application.base.BaseDetailActivity;
import com.success.application.common.param.Params;
import com.success.application.common.result.Result;
import com.success.application.myapplication.nav.NavFragment;

import java.lang.reflect.Type;
import java.util.Map;

public class MainActivity extends BaseDetailActivity<Map> {

    @Override
    protected int getContentLayoutId() {
        return R.layout.activity_main;
    }

    @Override
    protected int getTitleRes() {
        return R.string.index;
    }

    @Override
    protected boolean initBundle(Bundle bundle) {
        return true;
    }

    @Override
    public void initWidget() {
        FragmentManager manager = getSupportFragmentManager();
        NavFragment mNavBar = ((NavFragment) manager.findFragmentById(R.id.fag_nav));
        mNavBar.setup(this, manager, R.id.main_container);
        mTitleBar.setVisibility(View.GONE);
    }

    @Override
    protected void initData() {
        super.initData();
    }

    @Override
    protected Type getType() {
        return new TypeToken<Result<Map>>() {
        }.getType();
    }

    @Override
    protected void setData(Result<Map> result) {
    }

}

